The phrase to a T means "precisely" or "perfectly." If you follow your dad's recipe to a T, you can bake brownies that are just as delicious as his.
To a T is an informal adverb that describes anything you do in a careful way or to an ideal degree. If your Elvis impersonation is uncanny, you've got it down to a T, and if you're known for your unselfishness, your friends may say you're generous to a T. The first recorded appearance of this phrase was in a 1690 satire, but otherwise its origin is unknown.